cmake_minimum_required(VERSION 3.15.1)

project(spark-framework-test-qftp LANGUAGES CXX VERSION 0.0.1)

include(cmake/SparkWithGit.cmake)

spark_initialize_modules()

if(MSVC)
    # MSVC 编译器处理方案，支持 utf-8 编码的项目
    add_compile_options(/utf-8)
endif(MSVC)

spark_add_executable_path(${PROJECT_NAME}
    src
    src/dialog)
target_link_qt(${PROJECT_NAME})

# 1. 引用了公共存储库
spark_framework_include_with_git(${PROJECT_NAME} 
    https://gitee.com/spark-framework-libs/spark-framework-features
    FEATURES dbusutil)

# 2. 引用了该项目提供的 - 间接引用 QFtp
spark_framework_include_with_git(${PROJECT_NAME}
    https://gitee.com/spark-framework-libs/QFtpExample)

# 3. 引用了该项目提供的 Drag/Drop Eaters 与 EventUtil
spark_framework_include_with_git(${PROJECT_NAME}
    https://gitee.com/zinface/notepad--plugin.image-view)


if(WIN32)
    # Windows 下为目标追加图标资源与目标属性
    # target_sources(${PROJECT_NAME} PRIVATE icon.rc)
    set_target_properties(${PROJECT_NAME} 
        PROPERTIES WIN32_EXECUTABLE TRUE)
    return()
endif(WIN32)

